use tauri::{Window, WindowEvent};

pub fn handle_window_event(window: &Window, event: &WindowEvent) {
    if let tauri::WindowEvent::CloseRequested { api, .. } = event {
        api.prevent_close();
        window.hide().ok();
    }
}
